<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTableGoodsSkuAttrValueMaps extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('goods_sku_attr_value_maps', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('goods_id')->comment('产品ID');
            $table->bigInteger('goods_sku_id')->comment('货品ID');
            $table->integer('attr_id')->default(0)->comment('属性ID');
            $table->bigInteger('attr_value_id')->default(0)->comment('属性值ID');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('goods_sku_attr_value_maps');
    }
}
